home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMIBEST2.ADF / Best of AMICUS 2 / C / Boolean / bool.c < prev    next >
C/C++ Source or Header  |  1987-07-22  |  15KB  |  527 lines

  1. /*********************************************************
  2.   Example "C" program showing use of Boolean Gadgets.         
  3.  
  4.   This was compiled using Manx, Aztec "C", AmigaDos V1.2      
  5.   The code depends on V1.2 functions to operate correctly.    
  6.   It is intended to be run from CLI.                
  7.                                  
  8.   Note: All Image data must reside in CHIP memory ( lower     
  9.   512K). If using Lattice, run ATOM on the compiled output    
  10.   before linking. If using Manx, use the +Cdb switch on 
  11.   the linker.                            
  12.                                 
  13.   Copyright (C) 1987 H. Maybeck Tolly, TollySoft        
  14.   This program is in the public domain and may be 
  15.   distributed free of charge.                                             
  16.                                                               
  17. ***********************************************************/
  18.  
  19. #include <exec/types.h>
  20. #include <exec/exec.h>
  21. #include <intuition/intuition.h>
  22. #include <graphics/gfxbase.h>
  23. #include <functions.h>
  24.  
  25. struct IntuitionBase *IntuitionBase =0L;
  26. struct GfxBase *GfxBase = 0L;
  27. struct Window *ControlWindow = NULL;
  28. struct IntuiMessage *MyIntuiMessage;
  29.  
  30.  
  31. /********************************************/
  32. /* Border for toggle gadget (BoolGadget[1]) */
  33. /********************************************/
  34.  
  35. WORD BoolVectors[] = {0, 0,  51, 0,  51, 41,  0, 41,  0,0};
  36. struct Border BoolBorder = {
  37.    -1, -1,            /* initial offsets, gadget relative*/
  38.    3, 2, JAM1,        /* pens (fore, back) and drawmode */
  39.    5,                 /* number of vectors */
  40.    (SHORT *)BoolVectors, /* pointer to the actual array */
  41.              /* of vectors */
  42.    NULL                    /* no next border */
  43. };
  44.  
  45. /* All image data must reside in CHIP memory. */
  46.  
  47. /*******************************************************/
  48. /* Two Images for hit Gadget with altername images     */
  49. /* (BoolGadget[2])                                     */
  50. /*******************************************************/
  51.  
  52. /* Color 3 'X', 2 planes */
  53.  
  54. UWORD imageone[] = {
  55.     0xFFF0, 0x0000, 0x0000, 0x0FFF,
  56.     0x000F, 0xFF00,    0x00FF, 0xF000,
  57.     0x0000, 0xFFF0,    0x0FFF, 0x0000,
  58.     0x0000, 0x00FF,    0xFF00, 0x0000,
  59.     0x0000, 0x000F,    0xF000, 0x0000,
  60.     0x0000, 0x000F, 0xF000, 0x0000,
  61.     0x0000, 0x00FF,    0xFF00, 0x0000,
  62.     0x0000, 0xFFF0,    0x0FFF, 0x0000,
  63.     0x000F, 0xFF00,    0x00FF, 0xF000,
  64.     0xFFF0, 0x0000,    0x0000, 0x0FFF,
  65.  
  66.     0xFFF0, 0x0000, 0x0000, 0x0FFF,
  67.     0x000F, 0xFF00,    0x00FF, 0xF000,
  68.     0x0000, 0xFFF0,    0x0FFF, 0x0000,
  69.     0x0000, 0x00FF,    0xFF00, 0x0000,
  70.     0x0000, 0x000F,    0xF000, 0x0000,
  71.     0x0000, 0x000F, 0xF000, 0x0000,
  72.     0x0000, 0x00FF,    0xFF00, 0x0000,
  73.     0x0000, 0xFFF0,    0x0FFF, 0x0000,
  74.     0x000F, 0xFF00,    0x00FF, 0xF000,
  75.     0xFFF0, 0x0000,    0x0000, 0x0FFF
  76.     };
  77.  
  78. /* Color 2  '+', 2 planes */
  79.  
  80. UWORD imagetwo[] = {
  81.     0x0000, 0x0000, 0x0000, 0x0000,
  82.     0x0000, 0x0000, 0x0000, 0x0000,
  83.     0x0000, 0x0000, 0x0000, 0x0000,
  84.     0x0000, 0x0000, 0x0000, 0x0000,
  85.     0x0000, 0x0000, 0x0000, 0x0000,
  86.     0x0000, 0x0000, 0x0000, 0x0000,
  87.     0x0000, 0x0000, 0x0000, 0x0000,
  88.     0x0000, 0x0000, 0x0000, 0x0000,
  89.     0x0000, 0x0000, 0x0000, 0x0000,
  90.     0x0000, 0x0000, 0x0000, 0x0000,
  91.  
  92.     0x0000, 0x0FFF,    0xFFF0, 0x0000,
  93.     0x0000, 0x0FFF,    0xFFF0, 0x0000,
  94.     0x0000, 0x0FFF,    0xFFF0, 0x0000,
  95.     0xFFFF, 0xFFFF,    0xFFFF, 0xFFFF,
  96.     0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
  97.     0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
  98.     0xFFFF, 0xFFFF,    0xFFFF, 0xFFFF,
  99.     0x0000, 0x0FFF,    0xFFF0, 0x0000,
  100.     0x0000, 0x0FFF,    0xFFF0, 0x0000,
  101.     0x0000, 0x0FFF,    0xFFF0, 0x0000
  102.     };
  103.  
  104. struct Image BoolImage = {
  105.  0,0,64,10,2,
  106.  imageone,
  107.  0x03, 0x0, NULL
  108.  };
  109.  
  110. struct Image BoolHImage = {
  111.  0,0,64,10,2,
  112.  imagetwo,
  113.  0x03, 0x0, NULL
  114.  };
  115.  
  116. /*******************************************/
  117. /* Image for masked gadget (BoolGadget[3]) */
  118. /*******************************************/
  119.  
  120. USHORT gadget_imageData[] =
  121. {
  122.  
  123. 0x0000,0x0000,0x0000,0x0000,
  124. 0x0000,0x0000,0x0000,0x0000,
  125. 0x0000,0x0000,0x0000,0x0000,
  126. 0x0000,0x000F,0xF000,0x0000,
  127. 0x0000,0x00FF,0xFF00,0x0000,
  128. 0x0000,0x0FFF,0xFFF0,0x0000,
  129. 0x0000,0xFFFF,0xFFFF,0x0000,
  130. 0x0000,0xFFFF,0xFFFF,0x0000,
  131. 0x000F,0xFFFF,0xFFFF,0xF000,
  132. 0x000F,0xFFFF,0xFFFF,0xF000,
  133. 0x000F,0xFFFF,0xFFFF,0xF000,
  134. 0x00FF,0xFFFF,0xFFFF,0xFF00,
  135. 0x00FF,0xFFFF,0xFFFF,0xFF00,
  136. 0x00FF,0xFFFF,0xFFFF,0xFF00,
  137. 0x0FFF,0xFFFF,0xFFFF,0xFFF0,
  138. 0x0FFF,0xFFFF,0xFFFF,0xFFF0,
  139. 0x00FF,0xFFFF,0xFFFF,0xFF00,
  140. 0x00FF,0xFFFF,0xFFFF,0xFF00,
  141. 0x00FF,0xFFFF,0xFFFF,0xFF00,
  142. 0x000F,0xFFFF,0xFFFF,0xF000,
  143. 0x000F,0xFFFF,0xFFFF,0xF000,
  144. 0x000F,0xFFFF,0xFFFF,0xF000,
  145. 0x0000,0xFFFF,0xFFFF,0x0000,
  146. 0x0000,0xFFFF,0xFFFF,0x0000,
  147. 0x0000,0x0FFF,0xFFF0,0x0000,
  148. 0x0000,0x00FF,0xFF00,0x0000,
  149. 0x0000,0x000F,0xF000,0x0000,
  150. 0x0000,0x0000,0x0000,0x0000,
  151. 0x0000,0x0000,0x0000,0x0000,
  152. 0x0000,0x0000,0x0000,0x0000,
  153.  
  154. 0x0000,0x0000,0x0000,0x0000,
  155. 0x0000,0x0000,0x0000,0x0000,
  156. 0x0000,0x0000,0x0000,0x0000,
  157. 0x0000,0x0000,0x0000,0x0000,
  158. 0x0000,0x0000,0x0000,0x0000,
  159. 0x0000,0x0000,0x0000,0x0000,
  160. 0x0000,0x0000,0x0000,0x0000,
  161. 0x0000,0x0000,0x0000,0x0000,
  162. 0x0000,0x0000,0x0000,0x0000,
  163. 0x0000,0x0000,0x0000,0x0000,
  164. 0x0000,0x0000,0x0000,0x0000,
  165. 0x0000,0x0000,0x0000,0x0000,
  166. 0x0000,0x000F,0xF000,0x0000,
  167. 0x0000,0x00FF,0xFF00,0x0000,
  168. 0x0000,0x00FF,0xFF00,0x0000,
  169. 0x0000,0x0FFF,0xFFF0,0x0000,
  170. 0x0000,0x0FFF,0xFFF0,0x0000,
  171. 0x0000,0x0FFF,0xFFF0,0x0000,
  172. 0x0000,0x00FF,0xFF00,0x0000,
  173. 0x0000,0x00FF,0xFF00,0x0000,
  174. 0x0000,0x000F,0xF000,0x0000,
  175. 0x0000,0x0000,0x0000,0x0000,
  176. 0x0000,0x0000,0x0000,0x0000,
  177. 0x0000,0x0000,0x0000,0x0000,
  178. 0x0000,0x0000,0x0000,0x0000,
  179. 0x0000,0x0000,0x0000,0x0000,
  180. 0x0000,0x0000,0x0000,0x0000,
  181. 0x0000,0x0000,0x0000,0x0000,
  182. 0x0000,0x0000,0x0000,0x0000,
  183. 0x0000,0x0000,0x0000,0x0000
  184.  
  185. };
  186.  
  187. USHORT bool_mask[] =
  188. {
  189.  
  190. 0x0000,0x0000,0x0000,0x0000,
  191. 0x0000,0x0000,0x0000,0x0000,
  192. 0x0000,0x0000,0x0000,0x0000,
  193. 0x0000,0x0000,0x0000,0x0000,
  194. 0x0000,0x0000,0x0000,0x0000,
  195. 0x0000,0x0000,0x0000,0x0000,
  196. 0x0000,0x0000,0x0000,0x0000,
  197. 0x0000,0x0000,0x0000,0x0000,
  198. 0x0000,0x0000,0x0000,0x0000,
  199. 0x0000,0x0000,0x0000,0x0000,
  200. 0x0000,0x0000,0x0000,0x0000,
  201. 0x0000,0x0000,0x0000,0x0000,
  202. 0x0000,0x000F,0xF000,0x0000,
  203. 0x0000,0x00FF,0xFF00,0x0000,
  204. 0x0000,0x00FF,0xFF00,0x0000,
  205. 0x0000,0x0FFF,0xFFF0,0x0000,
  206. 0x0000,0x0FFF,0xFFF0,0x0000,
  207. 0x0000,0x0FFF,0xFFF0,0x0000,
  208. 0x0000,0x00FF,0xFF00,0x0000,
  209. 0x0000,0x00FF,0xFF00,0x0000,
  210. 0x0000,0x000F,0xF000,0x0000,
  211. 0x0000,0x0000,0x0000,0x0000,
  212. 0x0000,0x0000,0x0000,0x0000,
  213. 0x0000,0x0000,0x0000,0x0000,
  214. 0x0000,0x0000,0x0000,0x0000,
  215. 0x0000,0x0000,0x0000,0x0000,
  216. 0x0000,0x0000,0x0000,0x0000,
  217. 0x0000,0x0000,0x0000,0x0000,
  218. 0x0000,0x0000,0x0000,0x0000,
  219. 0x0000,0x0000,0x0000,0x0000
  220. };
  221.  
  222. struct Image BoolMaskImage = {
  223.     0,0,               /* LeftEdge, TopEdge */
  224.     64,30,2,           /* Width, Height, Depth */
  225.     &gadget_imageData[0],
  226.     0x03,0x00,         /* PlanePick, PlaneOnOff */
  227.     NULL,              /* Pointer to next Image */
  228. };
  229.  
  230. struct BoolInfo BoolInfo = {
  231.     BOOLMASK,         /* This is currently the only */
  232.              /* flag for boolean gadgets */
  233.     &bool_mask[0],   /* Pointer to the mask */
  234.     NULL
  235. };
  236.     
  237.    struct IntuiText IntuiStr_blank = 
  238.     {2,3,JAM2,5,5,NULL,(UBYTE *)"   ",NULL};
  239.  
  240.    struct IntuiText IntuiStr_yes = 
  241.     {2,3,JAM2,5,5,NULL,(UBYTE *)"YES",NULL};
  242.  
  243.    struct IntuiText IntuiStr_no = 
  244.     {2,3,JAM2,5,5,NULL,(UBYTE *)"NO",NULL};
  245.  
  246. /*******************************************************/
  247. /* Gadget structures for three example gadgets         */
  248. /*******************************************************/
  249.  
  250. struct Gadget BoolGadget[5] = {
  251. {
  252.  
  253. /* Hit gadget with Border */
  254.    NULL,             /* pointer to Next Gadget */
  255.    10,20,50,40,      /* (Left Top Width Height) Hit Box*/
  256.    GADGHCOMP ,       /* Flags */
  257.    GADGIMMEDIATE | RELVERIFY ,   /* Activation flags */
  258.    BOOLGADGET,        /* Type */
  259.    (APTR)&BoolBorder, /* pointer to Border Image */
  260.    NULL,              /* no pointer to SelectRender */
  261.    &IntuiStr_yes,     /* pointer to GadgetText */
  262.    0,                 /* no MutualExclude */
  263.    NULL,              /* pointer to SpecialInfo */
  264.    0,                 /* no ID */
  265.    NULL               /* no pointer to special data */
  266. },
  267.  
  268. /* Alternate Image gadget */
  269.    {&BoolGadget[0],110,20,64,10,GADGHIMAGE | GADGIMAGE ,
  270.       GADGIMMEDIATE | RELVERIFY | TOGGLESELECT,BOOLGADGET,
  271.       (APTR)&BoolImage,(APTR)&BoolHImage,&IntuiStr_yes,
  272.       0,NULL,0,NULL},
  273.  
  274. /* This gadget has mask. It must have SpecialInfo point */
  275. /* to a BoolInfo, and have the BOOLEXTEND flag set in   */
  276. /* its activation flags.                                */
  277.  
  278.    {&BoolGadget[1],220,20,64,30,GADGHCOMP | GADGIMAGE  ,
  279.      GADGIMMEDIATE | RELVERIFY | TOGGLESELECT | BOOLEXTEND,
  280.      BOOLGADGET,(APTR)&BoolMaskImage,NULL,NULL,0,
  281.      (APTR)&BoolInfo,0,NULL},
  282.  
  283. /* Mutual Exclude pair */
  284.    {&BoolGadget[2],10,120,64,10,GADGHCOMP | GADGIMAGE | 
  285.     SELECTED,GADGIMMEDIATE, BOOLGADGET,(APTR)&BoolImage,
  286.     NULL,NULL,0,NULL,0,NULL},
  287.    {&BoolGadget[3],110,120,64,10,GADGHCOMP | GADGIMAGE  ,
  288.     GADGIMMEDIATE, BOOLGADGET ,(APTR)&BoolHImage,NULL,
  289.     NULL,0,NULL,0,NULL}
  290.  
  291. };
  292.  
  293. struct NewWindow NewControlWindow = {
  294.    20, 20,               /* start LeftEdge, TopEdge */
  295.    320, 160,             /* start Width, Height */
  296.    2, 3,                 /* DetailPen, BlockPen */
  297.                  /* IDCMP FLAGS */
  298.    GADGETUP | GADGETDOWN | CLOSEWINDOW | MENUPICK,    
  299.                  /* Flags */
  300.    WINDOWDRAG | WINDOWDEPTH | WINDOWCLOSE | ACTIVATE,   
  301.    &BoolGadget[4],       /* Pointer to FirstGadget */
  302.    NULL,                 /* no pointer to first CheckMark*/
  303.    (UBYTE *)"Boolean Gadgets",/* Title */
  304.    NULL,                 /* no Pointer to Screen */
  305.    NULL,                 /* no Pointer to BitMap */
  306.    20, 20,               /* Min size (no size allowed) */
  307.    320, 160,             /* Max size (no size allowed) */
  308.    WBENCHSCREEN          /* Type of screen */
  309. };
  310.  
  311. /********************************************************/
  312. /* Menu declarations                                    */
  313. /********************************************************/
  314.  
  315.    struct IntuiText ghost_text = {
  316. /* Frontpen, Backpen, Draw Mode   */
  317.         2,1,JAM2,                      
  318. /* Left and Top offsets, Font     */
  319.         5,1,NULL,                      
  320. /* Text to display,next IntuiText */
  321.         (UBYTE *)"GHOST",NULL  } ;     
  322.  
  323.    struct MenuItem ghost_item = {
  324. /* Next item, left,top,width,height */
  325.         NULL,0,5,140,10,            
  326.         HIGHCOMP | ITEMENABLED | ITEMTEXT | COMMSEQ,
  327. /* MutualExclude, ItemFill (text)    */
  328.         NULL, (APTR) &ghost_text,  
  329. /* SelectFill, Command, Subitem      */
  330.         NULL, 'G', NULL } ;        
  331.  
  332.    struct Menu gadget_menu = {
  333. /* Next menu, left,top,width,height */
  334.         NULL, 0, 0, 60, 10,        
  335. /* Flags, text                      */
  336.         MENUENABLED, "Gadgets",    
  337. /* Pointer to first menu item       */
  338.         &ghost_item } ;            
  339.  
  340. /****************************************************/
  341. /* Main program                                     */
  342. /****************************************************/
  343.  
  344. main()
  345. {
  346.    struct MenuItem *ItemAddress();
  347.    ULONG Signals, MIClass, MICode, itemnum;        
  348.    APTR MIAddress;
  349.    LONG gad_pos, real_pos;
  350.  
  351. /* Open libraries */
  352.  
  353.    if (!(IntuitionBase = (struct IntuitionBase *)
  354.     OpenLibrary("intuition.library", 
  355.         (LONG)LIBRARY_VERSION)))
  356.    {
  357.       printf("Can't open the intuition library\n");
  358.       MyCleanup();
  359.       exit(FALSE);
  360.    }
  361.  
  362.    if (!(GfxBase = (struct GfxBase *)
  363.     OpenLibrary("graphics.library", 
  364.         (LONG)LIBRARY_VERSION)))
  365.    {
  366.       printf("Can't open the graphics library\n");
  367.       MyCleanup();
  368.       exit(FALSE);
  369.    }
  370.  
  371. /* Open window in which to display Boolean Gadgets. */
  372.  
  373.       if (!(ControlWindow = 
  374.     (struct Window *)OpenWindow(&NewControlWindow)))
  375.       {
  376.          printf("Couldn't open the control window.\n");
  377.          MyCleanup();
  378.          exit(FALSE);
  379.       }
  380.  
  381.    SetMenuStrip(ControlWindow, &gadget_menu);
  382.  
  383. /* Loop forever until user clicks Close Gadget on window.*/
  384.  
  385.    for (;;) {  /* wait for a signal and process it */
  386.  
  387.       Signals = Wait(1L << 
  388.     ControlWindow->UserPort->mp_SigBit);
  389.  
  390.          /* Process the Intuition message. */
  391.          while (MyIntuiMessage=(struct IntuiMessage *)
  392.                       GetMsg(ControlWindow->UserPort)) 
  393.          {
  394.          /* Get all the needed info and reply to message. */
  395.          MIClass = MyIntuiMessage->Class;
  396.          MICode = MyIntuiMessage->Code;
  397.          MIAddress = MyIntuiMessage->IAddress;
  398.          ReplyMsg(MyIntuiMessage);
  399.          /* Determine what the message was. */
  400.  
  401.            switch (MIClass) 
  402.        {
  403.              case MENUPICK:
  404.  
  405.              while (MICode != MENUNULL)
  406.              {
  407.                itemnum = ITEMNUM(MICode);
  408.                switch(itemnum)
  409.                {
  410. /* User chose to ghost Masked Gadget. */
  411.                   case 0:
  412.  
  413. /* Remove the Gadget from Intuition's control */
  414. /* before we change any values.               */
  415.                   gad_pos = RemoveGList(ControlWindow,
  416.             &BoolGadget[2],1L);
  417.  
  418. /* Ghost/Unghost the Masked Gadget. */
  419.                   BoolGadget[2].Flags ^= GADGDISABLED;
  420.  
  421. /* Return the Gadget to Intuition's control. */
  422.           real_pos = AddGList(ControlWindow, 
  423.             &BoolGadget[2], gad_pos, 1L, 
  424.             (LONG)NULL);
  425.  
  426. /* Refresh the display of the Gadget. */
  427.                   RefreshGList(&BoolGadget[2], 
  428.             ControlWindow, (LONG)NULL,1L);
  429.  
  430.                   break;
  431.  
  432.                } /* switch */
  433.  
  434. /* Get next Code if user extend-selected menu items. */
  435.                MICode = (ItemAddress(&gadget_menu,MICode))
  436.                 ->NextSelect;
  437.  
  438.              } /* while */
  439.              break;
  440.  
  441.          case GADGETUP:
  442.     
  443. /* Check for GADGETUP on hit Gadget with IntuiText. */
  444.              if (MIAddress == &BoolGadget[0])
  445.          {
  446.  
  447. /* Write out a blank string to cover up old characters. */
  448.  
  449. /* Remove the Gadget from Intuition's control */
  450. /* before we change any values.               */
  451.          gad_pos = RemoveGList(ControlWindow,
  452.         &BoolGadget[0],1L);
  453.  
  454.          BoolGadget[0].GadgetText = &IntuiStr_blank;
  455.  
  456. /* Return the Gadget to Intuition's control. */
  457.          real_pos = AddGList(ControlWindow, 
  458.         &BoolGadget[0],    gad_pos, 1L, (LONG)NULL);
  459.  
  460. /* Refresh the display of the Gadget. */
  461.              RefreshGList(&BoolGadget[0], ControlWindow, 
  462.         (LONG)NULL,1L);
  463.  
  464. /* Now write out the new string. */
  465.  
  466. /* Remove the Gadget from Intuition's control */
  467. /* before we change any values.               */
  468.          gad_pos = RemoveGList(ControlWindow,
  469.         &BoolGadget[0],1L);
  470.  
  471.          BoolGadget[0].GadgetText = &IntuiStr_no;
  472.  
  473. /* Return the Gadget to Intuition's control. */
  474.              real_pos = AddGList(ControlWindow, 
  475.         &BoolGadget[0],gad_pos, 1L, (LONG)NULL);
  476.  
  477. /* Refresh the display of the Gadget. */
  478.              RefreshGList(&BoolGadget[0], ControlWindow, 
  479.         (LONG)NULL,1L);
  480.          }
  481.  
  482.           break;
  483.  
  484.          case GADGETDOWN:
  485.  
  486. /* Check for GADGETDOWN on Mutual Exclude Gadgets. */
  487.          if (MIAddress == &BoolGadget[3] || MIAddress 
  488.             == &BoolGadget[4])
  489.          {
  490.          gad_pos = RemoveGList(ControlWindow, 
  491.         &BoolGadget[4], 2L);
  492.  
  493.          BoolGadget[3].Flags ^= SELECTED;
  494.          BoolGadget[4].Flags ^= SELECTED;
  495.  
  496.          AddGList(ControlWindow, &BoolGadget[4], 
  497.         gad_pos, 2L, NULL); 
  498.              RefreshGList(&BoolGadget[4], ControlWindow, 
  499.         (LONG)NULL,2L);
  500.          }
  501.  
  502.          break;
  503.  
  504. /* User clicked close Gadget. */
  505.              case CLOSEWINDOW:       
  506.  
  507. /* Reply to any outstanding messages. */
  508.              while (MyIntuiMessage =(struct IntuiMessage *)
  509.          GetMsg(ControlWindow->UserPort))
  510.                     ReplyMsg(MyIntuiMessage);
  511.              MyCleanup();
  512.              exit(TRUE);
  513.              break;
  514.  
  515.            }  /* switch */
  516.          } /* while */
  517.    }  /* for */
  518. }  /* main */
  519.  
  520. MyCleanup()
  521. {
  522.    if (ControlWindow) CloseWindow(ControlWindow);
  523.    if (GfxBase) CloseLibrary(GfxBase);
  524.    if (IntuitionBase) CloseLibrary(IntuitionBase);
  525. }
  526.  
  527.